package com.heima.apis.sensitive;

import com.heima.model.admin.dtos.SensitiveDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: ljl
 * @Date: 2022/11/16/21:39
 * @Description:
 */
@FeignClient(value = "leadnews-wemedia", contextId = "sensitive")
public interface ISensitiveClient {

    /**
     * 查询敏感词
     * @param sensitiveDto
     * @return
     */
    @PostMapping("/api/v1/sensitive/list")
    PageResponseResult wmSensitiveList(@RequestBody SensitiveDto sensitiveDto);

    /**
     * 根据id删除敏感词
     * @param id
     * @return
     */
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    ResponseResult wmSensitiveDeleteById(@PathVariable("id" ) Integer id);

    /**
     * 保存敏感词
     */
    @PostMapping("/api/v1/sensitive/save")
    ResponseResult wmSensitiveSave(@RequestBody WmSensitive wmSensitive);

    /**
     * 更新敏感词
     */
    @PostMapping("/api/v1/sensitive/update")
    ResponseResult wmSensitiveUpdate(@RequestBody WmSensitive wmSensitive);

    @GetMapping("/api/v1/sensitive/getAll")
    ResponseResult getAll();
}
